{include file="public/header"}
<link rel="stylesheet" href="/static/css/select.css">
<div class='select'>
	<div>
		<form action="{:url('select')}" method='post'>
			<ul class='select-ul'>
				<li><input type="text" name='av' placeholder='输入区域/小区名'></li>
				<li><input type='submit' class='btn-a' value='开始找房'></li>
			</ul>
		</form>
	</div>
</div>
<div class='condition'>
	<div class='con'>
		<div class='type'>
			<label>类型</label>
			<span>
				<a class='selected'>区域</a>
				<a href="{:url('index/renter/selected')}?type=地铁">地铁</a>
				<a href="{:url('index/renter/selected')}?type=高校">高校</a>
				<a href="{:url('index/renter/selected')}?type=周边">周边</a>
			</span>
		</div>
		<div class='area'>
			<label>区域</label>
			<span>
				<a class='selected'>区域</a>
				<a href="{:url('index/renter/selected')}?area=2">武进区</a>
				<a href="{:url('index/renter/selected')}?area=3">新北区</a>
				<a href="{:url('index/renter/selected')}?area=4">钟楼区</a>
			</span>
		</div>
		<div class='state'>
			<label>方式</label>
			<span>
				<a class='selected'>不限</a>
				<a href="{:url('index/renter/selected')}?state=整租">整租</a>
				<a href="{:url('index/renter/selected')}?state=合租">合租</a>
			</span>
		</div>
		<div class='price'>
			<label>价格</label>
			<span>
				<a class='selected'>不限</a>
				<a href="{:url('index/renter/selected')}?price=lt1500">1500以下</a>
				<a href="{:url('index/renter/selected')}?price=lt2000">1500-2000</a>
				<a href="{:url('index/renter/selected')}?price=lt3000">2000-3000</a>
			</span>
		</div>
		<div class='face'>
			<label>朝向</label>
			<span>
				<a class='selected' href="">不限</a>
				<a href="{:url('index/renter/selected')}?face=朝南">朝南</a>
				<a href="{:url('index/renter/selected')}?face=朝北">朝北</a>
				<a href="{:url('index/renter/selected')}?face=朝东">朝东</a>
				<a href="{:url('index/renter/selected')}?face=朝西">朝西</a>
			</span>
		</div>
		<div class='hu'>
			<label>户型</label>
			<span>
				<a class='selected' href="">不限</a>
				<a href="{:url('index/renter/selected')}?hu=1">1房</a>
				<a href="{:url('index/renter/selected')}?hu=2">2房</a>
				<a href="{:url('index/renter/selected')}?hu=3">3房</a>
				<a href="{:url('index/renter/selected')}?hu=4">4房</a>
			</span>
		</div>
		<div class='mian'>
			<label>面积</label>
			<span>
				<a class='selected' href="">不限</a>
				<a href="{:url('index/renter/selected')}?mian=lt15">15以下</a>
				<a href="{:url('index/renter/selected')}?mian=lt30">15-30</a>
				<a href="{:url('index/renter/selected')}?mian=lt50">30-50</a>
			</span>
		</div>
		<div class='reset'>
			<a href="">清除条件</a>
		</div>
	</div>
	<a href="javascript:;" class='btn-down'>
		<img class='down' src="/static/img/down.jpeg" alt="">
		<img class='up' src="/static/img/up.jpeg" alt="">
	</a>
</div>
<div class='order'>
	<div class='con'>
		<label>排序</label>
		<a class='selected' href="">默认</a>
		<a href="">租金</a>
		<a href="">面积</a>
		<a href="">时间</a>
	</div>
</div>
<div class='content'>
	<div class='con'>
		<div class='left'>
			<ul>
				{foreach name='data' item='v'}
				{if condition='$v.state == "合租"'}
					{foreach name="v['hid']" item='vv'}
				<li>
					<div class='left'>
						<a href="{:url('details')}?rid={$v.rid}&&hid={$vv}"><img src="/static/upload/owner/{$v.thumb}" alt=""></a>
					</div>
					<div class='right'>
						<div class='tit'><a href="{:url('details')}?rid={$v.rid}&&hid={$vv}" title=''>{$v.title}</a></div>
						<div class='desc'>
							<p>
								<span><a href="">{$v.state}</a></span><i>|</i><span><a href="">{$v.face}</a></span><i>|</i><span>{$v.mian}<sup>2</sup></span><i>|</i><span>{$v.floor}/{$v.allfloor}F</span><i>|</i><span>精装修</span>
							</p>
							<p></p>
						</div>
						<span>{$v.price}元</span>
						<div class='character'>
							<i class='tag'>品牌公寓</i>
							<a class='tag' href="">{$v.state}</a>
						</div>
					</div>
				</li>
					{/foreach}
				{else}
					<li>
						<div class='left'>
							<a href="{:url('details')}?rid={$v.rid}"><img src="/static/upload/owner/{$v.thumb}" alt=""></a>
						</div>
						<div class='right'>
							<div class='tit'><a href="{:url('details')}?rid={$v.rid}" title=''>{$v.title}</a></div>
							<div class='desc'>
								<p>
									<span><a href="">{$v.state}</a></span><i>|</i><span><a href="">{$v.face}</a></span><i>|</i><span>{$v.mian}<sup>2</sup></span><i>|</i><span>{$v.floor}/{$v.allfloor}F</span><i>|</i><span>精装修</span>
								</p>
								<p></p>
							</div>
							<span>{$v.price}元</span>
							<div class='character'>
								<i class='tag'>品牌公寓</i>
								<a class='tag' href="">{$v.state}</a>
							</div>
						</div>
					</li>
				{/if}
				{/foreach}
			</ul>
		</div>
		<div class='right' id='right'>
			<div class='first'><a href="{:url('index/owner/index')}"><img src="/static/img/owner.jpg" alt=""></a></div>
			<div id='second' class='second'>
				<div class='box'><a href="http://sz.ishangzu.com/huodong/friends/"><img src="/static/img/yao.png" alt=""></a></div>
				<div class='box'><a href="http://sz.ishangzu.com/huodong/friends/"><img src="/static/img/yao.png" alt=""></a></div>
				<div class='box'><a href="http://sz.ishangzu.com/huodong/friends/"><img src="/static/img/yao.png" alt=""></a></div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
    $('.btn-down').click(function(){
    	if($('.hu').css('display') == 'none'){
    		$('.hu,.mian').show();
    		$('.down').hide();
            $('.up').show();
    	}else{
    		$('.hu,.mian').hide();
    		$('.down').show();
         	$('.up').hide();
    	}
    });

$(function () {
	var ie6 = document.all;
	var dv = $('.second'), st;
	dv.attr('otop', dv.offset().top); //存储原来的距离顶部的距离
	$(window).scroll(function () {
		st = Math.max(document.body.scrollTop || document.documentElement.scrollTop);
		if (st > parseInt(dv.attr('otop'))) {
			dv.css({ 'position': 'fixed', top: 0 });
			if(st>1890){
				dv.remove();
			}else{
				if($('#second').length==0){
					$('#right').prepend(dv);
				}
			}
		}else if(dv.css('position') != 'static'){
			 dv.css({ 'position': 'static' });
		}
	});
});

$('.type>span,.area>span,.price>span,.state>span,.face>span,.hu>span,.mian>span').children().each(function(){  
    if($($(this))[0].href==String(window.location)){
    	$(this).addClass('selected');
    }    
})
</script>

{include file='public/footer'}